package com.anyou.mall.fin.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.EqualsAndHashCode;
import com.anyou.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.anyou.common.core.domain.BaseEntity;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 保证金管理对象 fin_bond
 *
 * @author gaochaohao
 * @date 2022-04-19
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper=false)
@ApiModel(value = "保证金管理")
@TableName(value = "fin_bond")
public class Bond extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 保证金编号 */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty("保证金编号")
    private Long bondId;


    /** 保证金类型：0汽配商，1维修厂，2司机 */
    @ApiModelProperty(value = "保证金类型：0合伙人，1维修厂，2司机",required = true)
    @Excel(name = "保证金类型：0合伙人，1维修厂，2司机")
    @NotNull(message = "保证金类型不能为空")
    private Integer bondType;


    @ApiModelProperty("司机id")
    private Long driverId;

    @ApiModelProperty("合伙人id")
    private Long partnerId;

    @ApiModelProperty("合伙人名称")
    @TableField(exist = false)
    private String shopName;
    @ApiModelProperty("合伙人电话")
    @TableField(exist = false)
    private String shopPhone;
    @ApiModelProperty("合伙人状态（0启用，1停用）")
    @TableField(exist = false)
    private String shopStatus;

    @ApiModelProperty("合伙人保证金金额")
    @TableField(exist = false)
    private BigDecimal shopBond;

    @ApiModelProperty("合伙人支付保证金时间")
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date shopPayBondTime;




    @ApiModelProperty("司机名字")
    @TableField(exist = false)
    private String driverName;
    @ApiModelProperty("司机电话")
    @TableField(exist = false)
    private String driverPhone;

    @ApiModelProperty("司机状态（0启用，1停用）")
    @TableField(exist = false)
    private Integer driverStatus;

    @ApiModelProperty("司机保证金金额")
    @TableField(exist = false)
    private BigDecimal driverBond;

    @ApiModelProperty("司机支付保证金时间")
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date driverPayBondTime;



}
